package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 群成员对象 chat_group_member
 * 
 * @author ruoyi
 * @date 2025-08-30
 */
public class ChatGroupMember extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 群组ID */
    @Excel(name = "群组ID")
    private Long groupId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 角色（0普通成员 1管理员 2群主） */
    @Excel(name = "角色", readConverterExp = "0=普通成员,1=管理员,2=群主")
    private String role;

    /** 群内昵称 */
    @Excel(name = "群内昵称")
    private String groupAlias;

    /** 是否被禁言（0否 1是） */
    @Excel(name = "是否被禁言", readConverterExp = "0=否,1=是")
    private String isBan;

    /** 加入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "加入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date joinTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setGroupId(Long groupId) 
    {
        this.groupId = groupId;
    }

    public Long getGroupId() 
    {
        return groupId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setRole(String role) 
    {
        this.role = role;
    }

    public String getRole() 
    {
        return role;
    }

    public void setGroupAlias(String groupAlias) 
    {
        this.groupAlias = groupAlias;
    }

    public String getGroupAlias() 
    {
        return groupAlias;
    }

    public void setIsBan(String isBan) 
    {
        this.isBan = isBan;
    }

    public String getIsBan() 
    {
        return isBan;
    }

    public void setJoinTime(Date joinTime) 
    {
        this.joinTime = joinTime;
    }

    public Date getJoinTime() 
    {
        return joinTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("groupId", getGroupId())
            .append("userId", getUserId())
            .append("role", getRole())
            .append("groupAlias", getGroupAlias())
            .append("isBan", getIsBan())
            .append("joinTime", getJoinTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
